package com.question.pojo.dto;

import com.question.pojo.entity.Blank;
import com.question.pojo.entity.Choice;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.List;

@Data
public class QuestionDTO implements Serializable {

    private Integer questionId;

//    @NotBlank(message = "题目类型不能为空")
    private String questionType;

//    @NotBlank(message = "题目内容不能为空")
    private String content;

    @NotNull(message = "基础分数不能为空")
    @Min(value = 1, message = "基础分数至少为1")
    private Integer baseScore;

    @NotNull(message = "题目权重不能为空")
    @DecimalMin(value = "0.1", message = "权重至少为0.1")
    private Double weight;

    @NotNull(message = "创建者ID不能为空")
    private Integer createdBy;

//    @NotNull(message = "专业ID不能为空")
//    private Integer majorId;

    @NotNull(message = "分类ID不能为空")
    private Integer categoryId;


    // 选择题选项
    private List<Choice> choices;
    // 填空题空位
    private List<Blank> blanks;
}